/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.gac.gacmod.model.steps;

import javax.swing.JOptionPane;
import org.gac.gacmod.genetics.ExecutionInput;
import org.gac.gacmod.genetics.ExecutionOutput;
import org.gac.gacmod.messages.MessageCollection;
import org.gac.gacmod.model.AtomicStep;

/**
 *
 * @author Tomek
 */
public class DiagnosticsMessageStep extends AtomicStep{

    public DiagnosticsMessageStep(String name)
    {
        super(name);
    }

    public DiagnosticsMessageStep()
    {
        this( null );
    }

    @Override
    public ExecutionOutput Run(ExecutionInput input)
    {
         JOptionPane.showMessageDialog( null, "Population size: " + input.getPopulation().size());
         return new ExecutionOutput(null, false, input.getPopulation());
    }

    @Override
    public void Validate(MessageCollection messages)
    {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
